package com.baor.controller;

import com.baor.service.InvoiceService;
import com.baor.utils.AjaxResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

@RestController
@RequestMapping("/invoice")
public class InvoiceController {
    @Autowired
    private InvoiceService invoiceService;

    @RequestMapping("/selectInvoice")
    public AjaxResult<?> selectInvoice(@RequestBody Map<String, Object> params) {
        return this.invoiceService.selectInvoice(params);
    }

    @RequestMapping("/selectInvoiceDetail")
    public AjaxResult<?> selectInvoiceDetail(@RequestBody Map<String, Object> params) {
        return this.invoiceService.selectInvoiceDetail(params);
    }

    @RequestMapping("/insertInvoice")
    public AjaxResult<?> insertInvoice(@RequestBody Map<String, Object> params) {
        return this.invoiceService.insertInvoice(params);
    }
    @RequestMapping("/selectInvoiceType")
    public AjaxResult<?> selectInvoiceType() {
        return this.invoiceService.selectInvoiceType();
    }
    @RequestMapping("/updateInvoiceStatus")
    public AjaxResult<?> updateInvoiceStatus(@RequestBody Map<String, Object> params) {
        return this.invoiceService.updateInvoiceStatus(params);
    }
}
